<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<h:body>
	<ui:composition template="templates/commonPage.xhtml">
		<ui:define name="pagecontent">
			<h:link outcome="orderslist">Order list</h:link>
			<h1>User info</h1>
			<h:form id="Form">
				<fieldset>
				
						<legend>User Personnal Informations</legend>
						<h:outputLabel>First name</h:outputLabel>
						<h:inputText value="#{showInfoMB.loginMB.user.firstName}" readonly="true" size="20" maxlength="60"/>
						<br/>
	
						<h:outputLabel>Last Name</h:outputLabel>
						<h:inputText value="#{showInfoMB.loginMB.user.lastName}" readonly="true" size="20" maxlength="60"/>
						<br/>
						
						
						<h:outputLabel>Date of birth</h:outputLabel>
						<h:inputText value="#{showInfoMB.loginMB.user.dateOfBirth}" readonly="true"/>
						
						
						<legend>Contact Informations</legend>
						<h:outputLabel>Street number</h:outputLabel>
						<h:inputText value="#{showInfoMB.loginMB.user.address.streetNumber}" readonly="true"/>
						<br/>
						
						<h:outputLabel>Street</h:outputLabel>
						<h:inputText value="#{showInfoMB.loginMB.user.address.street}" readonly="true"/>
						<br/>
						
						<h:outputLabel>Town</h:outputLabel>
						<h:inputText value="#{showInfoMB.loginMB.user.address.town}" readonly="true"/>
						<br/>
						
						<h:outputLabel>Zip Code</h:outputLabel>
						<h:inputText value="#{showInfoMB.loginMB.user.address.zipCode}" readonly="true"/>
						<br/>
						
						<h:outputLabel>Country</h:outputLabel>
						<h:inputText value="#{showInfoMB.loginMB.user.address.country}" readonly="true"/>
						<br/>
						
						<h:outputLabel>Phone Number</h:outputLabel>
						<h:inputText value="#{showInfoMB.loginMB.user.phoneNumber}" readonly="true"/>
						<br/>
						
						
						<legend>Login Informations</legend>
						<h:outputLabel>Mail</h:outputLabel>
						<h:inputText value="#{showInfoMB.loginMB.user.mail}" readonly="true"/>
						<br/>
						<br/>
						<h:commandButton action="#{showInfoMB.deleteUser}" value="Delete your account"/>
						
				</fieldset>
			</h:form>
			<h:link outcome="modifyaccount">Modifier vos informations personnelles</h:link>
			<br />
		</ui:define>

	</ui:composition>
</h:body>
</html>